FROM openjdk:8-jdk

WORKDIR /app

# 创建配置目录
RUN mkdir -p /app/config

# 添加应用jar包
COPY target/*.jar /app/app.jar

# 暴露应用端口
EXPOSE 8080

# 设置容器启动命令
ENTRYPOINT ["java", "-jar", "/app/app.jar", "--spring.config.location=file:/app/config/"]